/*  This file is part of Real Time Digital Audio Processing library.
 *  Copyright (C) 2008 - Emilio Monti - emilmont@gmail.com
 *
 *  Real Time Digital Audio Processing library is free software: you can
 *  redistribute it and/or modify it under the terms of the GNU General
 *  Public License as published by the Free Software Foundation, either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  Real Time Digital Audio Processing library is distributed in the hope
 *  that it will be useful, but WITHOUT ANY WARRANTY; without even the
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *  See the GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Real Time Audio Processing library.
 *  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef DSP_H_
#define DSP_H_

#include  <vector>
#include "portaudio.h"
#include "Module.h"

class DSP {
    public:
        DSP();
        void add(Module* module);
        void callback(float *in, float *out, unsigned long length);

        // Getters and setters of private fields
        void setMic(bool active) {mic_in = active;};
        bool getMic(void) {return mic_in;};
        unsigned int getSampleRate(void) {return sampleRate;};
        unsigned long getFramesPerBuffer(void) {return framesPerBuffer;};

        virtual ~DSP();


    private:
        std::vector<Module*> pipe;

        unsigned int sampleRate;
        unsigned long framesPerBuffer;
        bool mic_in;
};

#endif /*DSP_H_*/
